package com.ybear.citypickerview.holder;

import android.view.View;
import android.widget.TextView;

import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;

import com.ybear.citypickerview.R;
import com.ybear.ybcomponent.base.adapter.BaseViewHolder;

public class CityHolder extends BaseViewHolder {
    private TextView title;
    public CityHolder(@NonNull View itemView) {
        super(itemView);
        title = itemView.findViewById(R.id.item_city_tv_title);
    }

    public TextView getTitle() {
        return title;
    }

    public void setTitleColor(@ColorRes int resId) {
        title.setTextColor( itemView.getResources().getColor( resId ) );
    }
    public void setBackgroundResource(@DrawableRes int resId) {
        itemView.setBackgroundResource( resId );
    }
}
